/**
 * Created by Myron on 2015/8/11.
 */
// Patch res.render method to output logger
var config =require('../config.js')

exports.render = function (req, res, next) {
    res._render = res.render;

    res.render = function (view, options, fn) {

        options['render_name']='myron';
        options['Loader']=require('loader');
        options['assets']=require('../public/assets.json');
        options['CDN']=config.config.cndhost;

        res._render(view, options, fn);


    };

    next();
};